Quiz III:
Conditional statements + repetition statements
Reading from and writing to files
Date: Thursday April 09

- Method decomposition (Divide and conquer)

Pig Latin

Aim: translate an English sentence into Pig Latin

happy enough

enoughyay
appyhay

Application#1: 
PigLatinDriver.java
PigLatinTranslator.java

happy enough

Step#1: Decompose the sentence into words
Step#2: Translate the individual words
Step#3: Check whether a given word begins with a vowel or not

----------------------------End of Chapter 7 (Class relationships)----------------------------

Arrays (Elementary data structure)

An array is an object:
1. Declare an array:

double[] grades;
Alternatively:
double grades[];

main(String args[])

double[] arr1, arr2, arr3; // Go with this approach when declaring arrays
double arr1[], arr2[], arr3; // arr3 is just a regular double variable


2. Initialize the array:
grades = new double[25];

grades: 
0	1	2		24

0.0	0.0	0.0	....	0.0


grades[0] = 90;
min valid idx: 0
max valid idx: 24 = grades.length - 1

String str = "Ipsum"; System.out.println(str.length()); // length is a method
double grades = new double[25]; System.out.println(grades.length); // length is not a method

Application#2: 
Aim: populate an array with 15 successive increments of 10
0	1	2	3		14
0	10	20	30	...	140

ArrayDemo.java

Application#3:
Aim: print the 5 input values provided by the user in reverse order
1
2
3
4
5
5	4	3	2	1 

Application#4:
ArraysManipulation.java







